<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html><head>
        <link rel="stylesheet" type="text/css" href="apidocs.css"/>
        <title>API docs for &ldquo;sympy.functions.combinatorial.factorials.FallingFactorial&rdquo;</title>
        </head>
        <body><h1 class="class">Class s.f.c.f.FallingFactorial(<a href="sympy.core.function.Function.html">Function</a>):</h1><span id="part">Part of <a href="sympy.functions.combinatorial.factorials.html">sympy.functions.combinatorial.factorials</a></span><div class="toplevel"><pre>Falling factorial (related to rising factorial) is a double valued
function arising in concrete mathematics, hypergeometric functions
and series expanansions. It is defined by

            ff(x, k) = x * (x-1) * ... * (x - k+1)

where 'x' can be arbitrary expression and 'k' is an integer. For
more information check "Concrete mathematics" by Graham, pp. 66
or visit http://mathworld.wolfram.com/FallingFactorial.html page.

>>> from sympy import *
>>> x = Symbol('x')

>>> ff(x, 0)
1

>>> ff(5, 5)
120

>>> ff(x, 5)
x*(1 - x)*(2 - x)*(3 - x)*(4 - x)</pre></div><table class="children"><tr class="function"><td>Function</td><td><a href="#sympy.functions.combinatorial.factorials.FallingFactorial.canonize">canonize</a></td><td><div><p>Returns a canonical form of cls applied to arguments args.</p>
</div></td></tr><tr class="function"><td>Function</td><td><a href="#sympy.functions.combinatorial.factorials.FallingFactorial._eval_rewrite_as_gamma">_eval_rewrite_as_gamma</a></td><td><span class="undocumented">Undocumented</span></td></tr></table>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.functions.combinatorial.factorials.FallingFactorial.canonize">canonize(cls, x, k):</a></div>
            <div class="functionBody"><pre>Returns a canonical form of cls applied to arguments args.

The canonize() method is called when the class cls is about to be
instantiated and it should return either some simplified instance
(possible of some other class), or if the class cls should be
unmodified, return None.

Example of canonize() for the function "sign"
---------------------------------------------

@classmethod
def canonize(cls, arg):
    if arg is S.NaN:
        return S.NaN
    if arg is S.Zero: return S.One
    if arg.is_positive: return S.One
    if arg.is_negative: return S.NegativeOne
    if isinstance(arg, C.Mul):
        coeff, terms = arg.as_coeff_terms()
        if coeff is not S.One:
            return cls(coeff) * cls(C.Mul(*terms))</pre></div>
            </div>
            <div class="function">
            <div class="functionHeader">def <a name="sympy.functions.combinatorial.factorials.FallingFactorial._eval_rewrite_as_gamma">_eval_rewrite_as_gamma(self, x, k):</a></div>
            <div class="functionBody"><div class="undocumented">Undocumented</div></div>
            </div></body>
        